home *** CD-ROM | disk | FTP | other *** search
/ PC for Alla 2005 May / PC för Alla 0505.iso / fullversioner / realsoft3d / data1.cab / Scripting / scripts / js / real / raytr / r3frpart.js < prev    next >
Encoding:
JavaScript  |  2005-04-04  |  3.3 KB  |  98 lines

  1.  
  2. // JavaScript wrapper for r3frpart.h
  3. // Auto generated file, do not modify by hand
  4. // Copyright ⌐ 2004, Realsoft Graphics Oy
  5.  
  6. var R3_FRPART_H = 1;
  7. include("real/raytr/r3frsurf.js")
  8. include("oops/r3vector.js")
  9. include("real/frio/r3raysmp.js")
  10.  
  11.  
  12. var R3CLID_FRPARTICLE = 702;
  13.  
  14.  
  15.  
  16.  
  17. // Description: evaluate geometric description of the particle object to the raysample.
  18. // p1: Object, raysample to which properties are evaluated
  19.  
  20. R3FRPAM_RENDER = 702000;
  21.  
  22. function mR3FRPAM_RENDER(p1) {
  23.   DoA2(this.r3obj, 702000, p1, R3TID_OBJECT, 0, 0, R3TID_INTEGER, 0);
  24. }
  25.  
  26. // Description: Evaluate particle properties to a raysample in a point defined    * by R3CLID_ASCCHANNEL of the
  27. //      raysample. Typically, a particle object defines geometry    * related information. Position is already known when calling
  28. //      this method, so surface    * normal information may be the most natural channel to be computed.
  29. // p3: Object, ptr to a raysample.
  30.  
  31. R3FRPAM_EVALUATEPOINTPROPERT = 702002;
  32.  
  33. function mR3FRPAM_EVALUATEPOINTPROPERT(p3) {
  34.   DoA(this.r3obj, 702002, p3, R3TID_OBJECT, 0);
  35. }
  36.  
  37. // Description: render points of the particle to a z buffer at a given resolution.    * This
  38. //      method is used for finding out the shape of the particle in the target image.
  39. //      Actual shading related property evaluation will happen later by R3FRPAM_EVALUATEPOINTPROPERTIES. * The default action
  40. //      of the base class is projecting the position (of one point) to z buffer, finding
  41. //      the distance and sending the R3ZBM_PIXEL method to draw one 'pixel'. If the particle
  42. //      covers * several pixels, the particle class may either use existing z buffer drawing methods
  43. //      or compute * its interior pixels and use pixel drawing methods. * The default class
  44. //      actions are in more detail: * * R3VECTOR res; * R3FLOAT fade = 0.0; *
  45. //      if(!p2) return obj; * R3MxTransform(&res, p3->modelview, p); * if(msg->projection!=R3PRP_ORTHOGONAL) res.t = sqrt(PMUL(p,p)); * *
  46. //      return R3SendMsgA(p1, R3ZBM_PIXEL, &fade, &res); *
  47. // p1: Object, ptr to a z buffer object see friozbuffer.h
  48.  
  49. R3FRPAM_RENDERPOINTS = 702003;
  50.  
  51. function mR3FRPAM_RENDERPOINTS(p1) {
  52.   DoA2(this.r3obj, 702003, p1, R3TID_OBJECT, 0, 0, R3TID_INTEGER, 0);
  53. }
  54.  
  55. // Description: enumerate all channels that should be included in the drawport in R3FRPAM_RENDER method.    * by
  56. //      sending R3SendMsgA(retobj, retmth, channelname)
  57. // p1: Object, retobj
  58. // p3: Integer, retmth    
  59.  
  60. R3FRPAM_ENUMNEEDEDCHANNELS = 702004;
  61.  
  62. function mR3FRPAM_ENUMNEEDEDCHANNELS(p1, p3) {
  63.   DoA2(this.r3obj, 702004, p1, R3TID_OBJECT, 0, p3, R3TID_INTEGER, 0);
  64. }
  65.  
  66.  
  67.  
  68.  
  69. R3FRPAA_RenderClasses = 702500;
  70. function GetR3FRPAA_RenderClasses() {
  71.   return R3Get(this.r3obj, R3FRPAA_RenderClasses, R3TID_INTEGER, R3TNF_ARRAY); 
  72. }
  73.  
  74. R3FRPAA_Cog = 702501;
  75. function GetR3FRPAA_Cog() {
  76.   return R3Get(this.r3obj, R3FRPAA_Cog, R3TID_VECTOR, R3TNF_ARRAY); 
  77. }
  78.  
  79.  
  80.  
  81. function r3Frparticle () { 
  82.    this.base = r3God;
  83.    if(arguments.length) {
  84.       this.base(R3CLID_FRPARTICLE, arguments);
  85.    }
  86.    // Methods
  87.    this.RENDER=mR3FRPAM_RENDER;
  88.    this.EVALUATEPOINTPROPERT=mR3FRPAM_EVALUATEPOINTPROPERT;
  89.    this.RENDERPOINTS=mR3FRPAM_RENDERPOINTS;
  90.    this.ENUMNEEDEDCHANNELS=mR3FRPAM_ENUMNEEDEDCHANNELS;
  91.  
  92.    // Attributes
  93.    this.GetRenderClasses=GetR3FRPAA_RenderClasses;
  94.    this.GetCog=GetR3FRPAA_Cog;
  95. }
  96.  
  97. r3Frparticle.prototype=new r3Frsurface;
  98. // r3frpart.h_H